<!-- head start -->
<#include "common/head.html"/>
<!-- head end -->

<link rel="stylesheet" type="text/css" href="${domain}/static/css/article.css">
<title>${articleTitle}</title>

<!--navbar start-->
<#include "common/navbar.html"/>
<!--navbar end -->

<!--page content start-->
<div class="page-article">
    <div class="wrap">
    <p class="breadcrumb">
        <a href="${domain}">首页 &gt;</a>
        <span>${articleTitle}</span>
    </p>
    <div class="article-title">
        <div class="article-title01">
            <h2>${articleTitle}</h2>
            <div class="article-title01-from">
                <a href="">${department}</a> | <span class="article-title01-name">${articleAuthor}</span>
                <span class="article-title01-time"><span class="i-clock"></span>${publishTime}</span>
            </div>
            <p class="article-title01-tag">
                <#list tags as tag>
                    <span class="i-tag">${tag}</span>
                </#list>
            </p>
        </div>
    </div>
    <!--文章详情-->
    <div class="article-ct">
        <div class="article-ct-banner">
            <img src="${articleImg}" alt="">
        </div>
        <article class="article-ct-p">
            ${articleContent}
        </article>
    </div>

    <!--文章详情结束-->
    <div class="artile-bottom">
        <a href="" target="_self" class="artile-bottom01" id="preArticle">
            <span class="i-border-arrow"></span>上一篇
            <span class="text-normal" id="preArticleTitile"></span>
        </a>
        <a href="" target="_self" class="artile-bottom02" id="nextArticle">下一篇
            <span class="text-normal" id="nextArticleTitile"></span>
            <span class="i-border-arrow"></span>
        </a>
    </div>
    <input id="articleId" type="hidden" value="${articleId}">

    <script>
        window.onload = function () {
            var xmlhttp = new XMLHttpRequest();
            var url = "http://10.99.69.43:8080/portal/site/article/link/" + document.getElementById("articleId").value;
            xmlhttp.open("GET", url, true);
            xmlhttp.send();
            xmlhttp.onreadystatechange = function () {
                if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
                    var object = JSON.parse(xmlhttp.responseText);
                    if (object.preArticle.articleTitle == undefined || object.preArticle.articleTitle == "") {
                        document.getElementById("nextArticle").style.visibility = "hidden";
                    } else {
                        document.getElementById("nextArticle").setAttribute("href", object.preArticle.articleUrl);
                        document.getElementById("nextArticleTitile").innerHTML = object.preArticle.articleTitle;
                    }

                    if (object.nextArticle.articleTitle == undefined || object.nextArticle.articleTitle == "") {
                        document.getElementById("preArticle").style.visibility = "hidden";
                    } else {
                        document.getElementById("preArticle").setAttribute("href", object.nextArticle.articleUrl);
                        document.getElementById("preArticleTitile").innerHTML = object.nextArticle.articleTitle;
                    }
                }
            }
        }
    </script>
</div>
</div>
<!--page content end-->


<!-- foot start -->
<#include "common/foot.html"/>
<!-- foot end -->